using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._MosaicDataset
{
    /// <summary>
    /// <para>Build Boundary</para>
    /// <para>Updates the extent of the boundary when adding new raster datasets to a mosaic dataset that extend beyond its previous coverage.</para>
    /// <para>将新的栅格数据集添加到超出其先前覆盖范围的镶嵌数据集时，将更新边界的范围。</para>
    /// </summary>    
    [DisplayName("Build Boundary")]
    public class BuildBoundary : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public BuildBoundary()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Mosaic Dataset</para>
        /// <para>Select the mosaic dataset where you want to recompute the boundary.</para>
        /// <para>选择要重新计算边界的镶嵌数据集。</para>
        /// </param>
        public BuildBoundary(object _in_mosaic_dataset)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Build Boundary";

        public override string CallName => "management.BuildBoundary";

        public override List<string> AcceptEnvironments => ["parallelProcessingFactor"];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _where_clause, _append_to_existing.GetGPValue(), _simplification_method.GetGPValue(), _out_mosaic_dataset];

        /// <summary>
        /// <para>Mosaic Dataset</para>
        /// <para>Select the mosaic dataset where you want to recompute the boundary.</para>
        /// <para>选择要重新计算边界的镶嵌数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Query Definition</para>
        /// <para>An SQL query to compute a boundary for select raster datasets. Use this option in conjunction with the Append to Existing Boundary option to save time when adding new raster datasets.</para>
        /// <para>用于计算所选栅格数据集边界的 SQL 查询。将此选项与追加到现有边界选项结合使用，以节省添加新栅格数据集的时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Query Definition")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Append To Existing Boundary</para>
        /// <para><xdoc>
        ///   <para>Use this option when adding new raster datasets to an existing mosaic dataset. Instead of calculating the entire boundary, it will merge the boundary of the new raster datasets with the existing boundary.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Append the perimeter of footprints to the existing boundary. This can save time when adding additional raster data to the mosaic dataset, as the entire boundary will not be recalculated. If there are rasters selected, the boundary will be recalculated to include only the selected footprints. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Recompute the boundary in its entirety.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将新栅格数据集添加到现有镶嵌数据集时，请使用此选项。它不会计算整个边界，而是将新栅格数据集的边界与现有边界合并。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 将轮廓线的周长追加到现有边界。在向镶嵌数据集添加其他栅格数据时，这可以节省时间，因为不会重新计算整个边界。如果选择了栅格，则将重新计算边界以仅包含所选轮廓线。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 重新计算整个边界。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Append To Existing Boundary")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _append_to_existing_value _append_to_existing { get; set; } = _append_to_existing_value._false;

        public enum _append_to_existing_value
        {
            /// <summary>
            /// <para>APPEND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("APPEND")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>OVERWRITE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("OVERWRITE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Simplification Method</para>
        /// <para><xdoc>
        ///   <para>The simplification method reduces the number of vertices, since a dense boundary can affect performance.</para>
        ///   <para>Choose which simplification method to use to simplify the boundary.</para>
        ///   <bulletList>
        ///     <bullet_item>None—No simplification method will be implemented. This is the default.</bullet_item><para/>
        ///     <bullet_item>Convex hull—The minimum bounding geometry of the mosaic dataset will be used to simplify the boundary. If there are any footprints that are disconnected, a minimum bounding geometry for each continuous group of footprints will be used to simplify the boundary.</bullet_item><para/>
        ///     <bullet_item>Envelope—The envelope of the mosaic dataset will provide a simplified boundary. If there are any footprints that are disconnected, an envelope for each continuous group of footprints will be used to simplify the boundary.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>简化方法减少了顶点的数量，因为密集边界会影响性能。</para>
        ///   <para>选择用于简化边界的简化方法。</para>
        ///   <bulletList>
        ///     <bullet_item>无—不实施任何简化方法。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>凸包—镶嵌数据集的最小边界几何将用于简化边界。如果有任何断开连接的轮廓线，则将使用每个连续轮廓线组的最小边界几何来简化边界。</bullet_item><para/>
        ///     <bullet_item>包络—镶嵌数据集的包络将提供简化边界。如果有任何断开连接的封装，则将使用每个连续的封装组的包络来简化边界。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Simplification Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _simplification_method_value _simplification_method { get; set; } = _simplification_method_value._NONE;

        public enum _simplification_method_value
        {
            /// <summary>
            /// <para>None</para>
            /// <para>None—No simplification method will be implemented. This is the default.</para>
            /// <para>无—不实施任何简化方法。这是默认设置。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Convex hull</para>
            /// <para>Convex hull—The minimum bounding geometry of the mosaic dataset will be used to simplify the boundary. If there are any footprints that are disconnected, a minimum bounding geometry for each continuous group of footprints will be used to simplify the boundary.</para>
            /// <para>凸包—镶嵌数据集的最小边界几何将用于简化边界。如果有任何断开连接的轮廓线，则将使用每个连续轮廓线组的最小边界几何来简化边界。</para>
            /// </summary>
            [Description("Convex hull")]
            [GPEnumValue("CONVEX_HULL")]
            _CONVEX_HULL,

            /// <summary>
            /// <para>Envelope</para>
            /// <para>Envelope—The envelope of the mosaic dataset will provide a simplified boundary. If there are any footprints that are disconnected, an envelope for each continuous group of footprints will be used to simplify the boundary.</para>
            /// <para>包络—镶嵌数据集的包络将提供简化边界。如果有任何断开连接的封装，则将使用每个连续的封装组的包络来简化边界。</para>
            /// </summary>
            [Description("Envelope")]
            [GPEnumValue("ENVELOPE")]
            _ENVELOPE,

        }

        /// <summary>
        /// <para>Updated Input Mosaic Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_mosaic_dataset { get; set; }


        public BuildBoundary SetEnv(object parallelProcessingFactor = null)
        {
            base.SetEnv(parallelProcessingFactor: parallelProcessingFactor);
            return this;
        }

    }

}